ASP tutorial. NET C # picture scaling enlarge Cut Code
using System;Using System.Collections.Generic;Using System.Text;Using System.IO;Using System.Drawing;Using System.Drawing.Drawing2D;Using System.Drawing.Imaging;
Namespace
C # language has a lot to learn, here we mainly introduce C # implementation thumbnails, including the introduction of C # Implementation thumbnails must rely on third-party components and so on.
In the past, C # implementation thumbnails on the
Comparison | Compression just helps a friend to do a picture management tool, originally his program is using ASP, but the ASP in some server aspect function really lacks, therefore I use. NET gave him a small picture upload tool pictures in the
Previously, third-party components must be used to implement thumbnails on the page. Now, with. NET, you can easily implement thumbnails. The following is an example of how to implement a thumbnail.
Keywords: C #, ASP. NET, thumbnail
Download
Before thumbnails, implementing thumbnails on a page must be aided by Third-party components. Now that you have. NET, you can easily implement thumbnails. Here is an example of implementing a thumbnail.
Keywords: C #, ASP.net, thumbnails
Instance
ASP. NET (VB) adds watermark text to the image: Specifies the image to add watermark text
DimimgAsImage = Image. FromFile (Server. MapPath ("~ /Upload/1.jpg"))
'Create a bitmap object for drawing operations. You cannot directly operate on a
Using System;
Using System. Data;
Using System. Data. SqlClient;
Using System. Configuration;
Using System. Web;
Using System. Web. Security;
Using System. Web. UI;
Using System. Web. UI. WebControls;
Using System. Web. UI. WebControls.
The thumbnails generated by ASP. NET are very distorted. If the original image file is in JPG format, you can use the following program to optimize it:Private void makeslt (string oldimagepath, string newimagepath)
...{
// Oldimagepath-source image
Before thumbnails, implementing thumbnails on a page must be aided by Third-party components. Now that you have. NET, you can easily implement thumbnails. Here is an example of implementing a thumbnail.
Tothumbnailimage.aspx
inherits=
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.